package com.sweet.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.sweet.Result;
import com.sweet.handle.CustomBolckHander;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class GlobalLimitController {

    @GetMapping("/customBolckHander")
    @SentinelResource(value = "customBolckHander",
            blockHandlerClass = CustomBolckHander.class,
            blockHandler = "handlerException2")
    public Result customBolckHander() {
        return Result.ok("按照客户自定义限流ok！(*^▽^*)");
    }
}
